package com.erp.erp_project.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.util.Date;

/**
 * @author the bright star
 */
@Data
@ToString
@NoArgsConstructor
@AllArgsConstructor
@TableName("c_order")
public class Order {
    @TableId(type = IdType.AUTO)
    private Integer orderId;
    private Integer customId;
    private Integer productId;
    private Integer quantity;
    private Double unitPrice;
    private String unit;
    private Date orderDate;
    private Date requestDate;
    private String image;
    @TableField("file")
    private String files;
    private String note;
    private Integer status;
    private Customer customer;
    private Product product;



    public Order(Integer customId, Integer productId, Integer quantity, Double unitPrice, String unit, Date orderDate, Date requestDate, String image, String files, String note) {
        this.customId = customId;
        this.productId = productId;
        this.quantity = quantity;
        this.unitPrice = unitPrice;
        this.unit = unit;
        this.orderDate = orderDate;
        this.requestDate = requestDate;
        this.image = image;
        this.files = files;
        this.note = note;
    }
}
